#ifndef ADC_H
#define ADC_H

#include <inttypes.h>

#define ADC_OFFSET    0x10
#define ADC_INDEX   4

#define ADC_DONE    0x80000000
#define ADC_OVERRUN   0x40000000
#define ADC_ADINT   0x00010000

#define ADC_NUM     8   /* for LPC23xx */
#define ADC_CLK     1000000   /* set to 1Mhz */

#define AD0_BASE_ADDR ((unsigned int)&AD0CR)



void ADCInit(uint32_t ADC_Clk);
uint32_t ADC0Read(uint8_t channelNum);

#endif
